{% extends 'main/index.html' %}

{% block center %}
<script>
$(document).ready(function(){
        // binds form submission and fields to the validation engine
$("#ae_form").validationEngine();

});
</script>


{% if "error" in pageData %}
<div id="box">
  <b>{{ pageData['error'] }}</b>
    <br /> <br />
    </div>
{% endif %}


<div id="page" align="center">
    <br />
<fieldset>
    <span class="testa"><h1>Registrazione</h1></span>
<form class="cmxform" id="ae_form" method="post" action="/userRegistration?new">
    <input type="hidden" name="string" value="{{pageData['string']}}"/>
<table border="0" cellpadding="0" cellspacing="2" id="contacts">
    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <tr>
        <td colspan="2" class="tdSez"><b>Dati Accesso:</b></td>
    </tr>
    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Username -->
    <tr>
        <td align="left" >Username*:</td>
        <td align="left"><input type="text" name="username" id="username" size="30" maxlength="100" class="validate[required,minSize[5],ajax[ajaxUserCall]] text-input" value="{{pageData['forms'].username|nonone}}" /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Password -->
    <tr>
        <td align="left">Password*:</td>
        <td align="left"><input type="password" name="password" id="password" size="30" maxlength="100" class="validate[required,minSize[6]] text-input"   /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Conferma Password -->
    <tr>
        <td align="left">Conferma Password*:</td>
        <td align="left"><input type="password" name="repassword" id="repassword" size="30" maxlength="100" class="validate[required,equals[password],minSize[6]] text-input" /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <tr>
        <td colspan="2" class="tdSez"><b>Dati:</b></td>
    </tr>
    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Ragione Sociale -->
    <tr>
        <td align="left">Ragione sociale <br /> Cognome Nome:</td>
        <td align="left"><input type="text" name="ragione_sociale" size="60" maxlength="200" class="validate[required] text-input"  value="{{pageData['forms'].ragione_sociale|nonone}}"/></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <tr>
        <td align="left">Indirizzo:</td>
        <td align="left"><input class="validate[required] text-input" type="text" name="sede_legale_indirizzo" size="60" value='{{pageData["forms"].sede_legale_indirizzo|nonone}}' /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
<tr>
    <td align="left">CAP:</td>
    <td align="left"><input  type="text" name="sede_legale_cap" size="5" value='{{pageData["forms"].sede_legale_cap|nonone}}' /></td>
</tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Città -->
    <tr>
        <td class="contacts-left">Città:</td>
        <td class="contacts-right"><input type="text" name="citta" size="30" maxlength="50" class="validate[required] text-input" value="{{pageData['forms'].citta|nonone}}" /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Provincia -->
    <tr>
        <td class="contacts-left">Provincia:</td>
        <td class="contacts-right">
            <select name="provincia" class="validate[required]">
            {% for prov in pageData['province'] %}
                {% if prov.id == pageData["forms"].provincia %}
                    <option value="{{prov.id }}" selected="yes">{{prov.denominazione}}&nbsp;(&nbsp;{{prov.denominazione_breve }}&nbsp;)</option>
                {% else %}
                    <option value="{{prov.id }}">{{prov.denominazione}}&nbsp;(&nbsp;{{prov.denominazione_breve }}&nbsp;) </option>
                {% endif %}
            {% endfor %}
            </select>
        </td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Regione -->
    <tr>
        <td class="contacts-left">Regione:</td>
        <td class="contacts-right">
            <select name="regione" class="validate[required]">
            {% for reg in pageData['regioni'] %}
                {% if reg.id == pageData["forms"].regione %}
                    <option value="{{reg.id }}" selected="yes">{{reg.denominazione}}</option>
                {% else %}
                    <option value="{{reg.id }}">{{reg.denominazione}}</option>
                {% endif %}
            {% endfor %}
            </select>
        </td>
    </tr>
    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- CF -->
    <tr>
        <td align="left">Codice Fiscale:</td>
        <td align="left"><input  class="validate[groupRequired[cfopi],maxSize[16]]" type="text" name="codice_fiscale" size="20" value='{{pageData["forms"].codice_fiscale|nonone}}' /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
        <!-- P.I -->
    <tr>
        <td align="left">Partita Iva:</td>
        <td align="left"><input  class="validate[groupRequired[cfopi],maxSize[11]]"  type="text" name="partita_iva" size="20" value='{{pageData["forms"].partita_iva|nonone}}' /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <tr>
        <td colspan="2" class="tdSez"><b>Contatti:</b></td>
    </tr>
    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- E-mail -->
    <tr>
        <td class="contacts-left">E-mail*:</td>
        <td class="contacts-right"><input type="text" name="email" id="email" size="30" maxlength="50" class="validate[required,custom[email],ajax[ajaxEmailCall]] text-input" /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Conferma e-mail -->
    <tr>
        <td class="contacts-left">Conferma E-mail*:</td>
        <td class="contacts-right"><input type="text" name="re_email" size="30" maxlength="50" class="validate[required,equals[email]] text-input" /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Cellulare -->
    <tr>
        <td align="left">Cellulare:</td>
        <td align="left"><input  class="validate[groupRequired[cont]]" type="text" name="cliente_cellulare_principale" size="20" value='{{pageData["forms"].cellulare_principale|nonone}}' /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Telefono -->
    <tr>
        <td align="left">Telefono:</td>
        <td align="left"><input class="validate[groupRequired[cont]]" type="text" name="telefono_principale" size="20" value='{{pageData["forms"].telefono_principale|nonone}}' /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- FAX -->
    <tr>
        <td align="left">Fax:</td>
        <td align="left"><input  type="text" name="fax_principale" size="20" value='{{pageData["forms"].fax_principale|nonone}}' /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Sito-Web -->
    <tr>
        <td align="left">Sito web:</td>
        <td align="left"><input type="text" name="url" size="60" maxlength="200" class="validate[custom[url]] text-input" value="{{pageData['forms'].url|nonone}}" /></td>
    </tr>
    <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <tr>
        <td align="left">Note:</td>
        <td align="left"><textarea type="text" name="note" rows="5" cols="66" />{{pageData["forms"].note|nonone}}</textarea></td>
    </tr>


    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <tr>
        <td colspan="2" class="tdSez"><b>Antispam:</b></td>
    </tr>
    <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- captcha -->
    <tr>
        <td align="left">Inserisci valori:<br/><br/>
            <img src="/tpl/main/captcha.png?{{pageData['string']}}"></td>
        <td class="contacts-right"><input type="text" id="{{pageData['string']}}" name="captcha" size="5" maxlength="5" class="validate[required,ajax[ajaxCaptchaCall],maxSize[5]] text-input" /></td>
    </tr>
        <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <tr>
        <td colspan="2" align="left" ><input type="checkbox" name="mailing_list" checked/>Desidero essere informato sulle più importanti novità relative al Promogest (Max quattro e-mail/anno)</td>
    </tr>
    </tr>
        <tr>
        <td colspan="2" class="Div02"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <tr>
        <td colspan="2" align="left" ><input type="checkbox" name="privacy" class="validate[required]" checked/>Autorizzo al trattamento dei dati ai sensi della Legge 196/03</td>
    </tr>
        <tr>
        <td colspan="2" class="Div01"><img src="/tpl/img/trasparente.gif" border="0" width="10" height="9"></td>
    </tr>
    <!-- Bottoni -->
    <tr>
        <td class="contacts-center"><input type="submit" value="Prosegui" class="submit" /></td>
        <td class="contacts-center"><input type="reset" value="Azzera campi" class="submit" /></td>
    </tr>

</table>
</form>
</fieldset>
    <p>Compilando questo modulo vi autorizzo al trattamento dei dati ai sensi della Legge 196/03.<br />
    Promotux S.n.c, dichiara che: nel pieno rispetto della legge per la tutela dei dati personali, i dati forniti tramite il presente modulo non saranno divulgati in nessun modo senza la Sua preventiva, esplicita e scritta autorizzazione.<br /> Titolare e responsabile dei dati raccolti è la Promotux S.n.c. Via Gorizia, 3 - 09047 Selargius CA - tel +39 070 8649705
    </p>
</div>
{% endblock %}
